<template>
  <div>
    <div id="content" >
      <P v-for="(item,index) in bookDetail" :key="index">{{item[book]}}</P>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      bookDetail: [],
      book: this.$route.path.slice(1)
    };
  },

  created() {
    this.$http
      .get("static/detail.json")
      .then(({ data }) => (this.bookDetail = data));
  }
};
</script>


<style scoped>

#content {
  padding-left: 50px;
}
</style>
